<?php
class Ticket
{
   public $id;
   public $received; // time received
   public $firstname;
   public $lastname;
   public $email;
   public $subject;
   public $description;
   public $administrator_id;
   public $ticket_is_open;

	public function __construct($id, $received, $firstname, $lastname, $email, $subject, $description,
				$administrator_id, $ticket_is_open)
	{
		$this->id = $id;
		$this->received = $received;
		$this->firstname = $firstname;
		$this->lastname = $lastname;
		$this->email = $email;
		$this->subject = $subject;
		$this->description = $description;
		$this->administrator_id = $administrator_id;
		$this->ticket_is_open = $ticket_is_open;
		
	}
	
	private function enforceStringLengths()
	{
		$this->firstname = substr($this->firstname, 0, 63);
		$this->lastname = substr($this->lastname, 0, 63);
		$this->email = substr($this->email, 0, 63);
		$this->subject = substr($this->subject, 0, 63);
		$this->description = substr($this->description, 0, 1023);
	}

	public function __toString()
	{
		return "to string doesn't do anything for ticket.php<br />";
	}

}
?>

